.class Lcom/netease/newsreader/weibo/WeiboLogin$2;
.super Landroid/webkit/WebViewClient;
.source "WeiboLogin.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/netease/newsreader/weibo/WeiboLogin;->onCreate(Landroid/os/Bundle;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/weibo/WeiboLogin;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/weibo/WeiboLogin;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/weibo/WeiboLogin$2;->this$0:Lcom/netease/newsreader/weibo/WeiboLogin;

    .line 115
    invoke-direct {p0}, Landroid/webkit/WebViewClient;-><init>()V

    return-void
.end method


# virtual methods
.method public onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V
    .locals 2
    .parameter "view"
    .parameter "url"

    .prologue
    .line 119
    invoke-super {p0, p1, p2}, Landroid/webkit/WebViewClient;->onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V

    .line 120
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin$2;->this$0:Lcom/netease/newsreader/weibo/WeiboLogin;

    invoke-static {v0}, Lcom/netease/newsreader/weibo/WeiboLogin;->access$4(Lcom/netease/newsreader/weibo/WeiboLogin;)Landroid/widget/LinearLayout;

    move-result-object v0

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 121
    const-string v0, "javascript:(function() {document.getElementsByClassName(\'thridBgbor\')[0].style.border=\'0px\';document.getElementsByClassName(\'thridBgbor\')[0].children[0].style.border=\'0px\';document.getElementsByClassName(\'linedot_ph\')[0].style.paddingTop = \'0px\';document.getElementsByClassName(\'opthTable\')[0].style.paddingTop = \'0px\';document.getElementsByClassName(\'opthTable\')[0].style.paddingBottom = \'0px\';document.getElementsByClassName(\'thridBgbor\')[0].style.border=\'0px\';document.getElementsByClassName(\'thridBgbor\')[0].children[0].style.border=\'0px\';document.getElementsByClassName(\'title\')[0].innerHTML = document.getElementsByClassName(\'title\')[0].innerHTML.replace(\'<br><br>\',\'\');document.getElementsByClassName(\'btn_gray\')[0].href=\'close://\';})()"

    invoke-virtual {p1, v0}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    .line 132
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-static {}, Lcom/netease/newsreader/weibo/YdNoteLoginHelper;->getBaseUrl()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "oauth/"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "authorize"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 133
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin$2;->this$0:Lcom/netease/newsreader/weibo/WeiboLogin;

    invoke-static {v0}, Lcom/netease/newsreader/weibo/WeiboLogin;->access$4(Lcom/netease/newsreader/weibo/WeiboLogin;)Landroid/widget/LinearLayout;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 134
    const-string v0, "javascript:window.webhandler.show(document.body.innerHTML);"

    invoke-virtual {p1, v0}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    .line 136
    :cond_0
    return-void
.end method

.method public onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V
    .locals 2
    .parameter "view"
    .parameter "url"
    .parameter "favicon"

    .prologue
    .line 184
    invoke-super {p0, p1, p2, p3}, Landroid/webkit/WebViewClient;->onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V

    .line 185
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin$2;->this$0:Lcom/netease/newsreader/weibo/WeiboLogin;

    invoke-static {v0}, Lcom/netease/newsreader/weibo/WeiboLogin;->access$6(Lcom/netease/newsreader/weibo/WeiboLogin;)I

    move-result v0

    const/4 v1, 0x3

    if-ne v0, v1, :cond_0

    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin$2;->this$0:Lcom/netease/newsreader/weibo/WeiboLogin;

    invoke-static {v0, p1, p2}, Lcom/netease/newsreader/weibo/WeiboLogin;->access$5(Lcom/netease/newsreader/weibo/WeiboLogin;Landroid/webkit/WebView;Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 186
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin$2;->this$0:Lcom/netease/newsreader/weibo/WeiboLogin;

    invoke-virtual {v0}, Lcom/netease/newsreader/weibo/WeiboLogin;->finish()V

    .line 188
    :cond_0
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin$2;->this$0:Lcom/netease/newsreader/weibo/WeiboLogin;

    invoke-static {v0}, Lcom/netease/newsreader/weibo/WeiboLogin;->access$4(Lcom/netease/newsreader/weibo/WeiboLogin;)Landroid/widget/LinearLayout;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 189
    return-void
.end method

.method public onReceivedError(Landroid/webkit/WebView;ILjava/lang/String;Ljava/lang/String;)V
    .locals 2
    .parameter "view"
    .parameter "errorCode"
    .parameter "description"
    .parameter "failingUrl"

    .prologue
    .line 154
    invoke-super {p0, p1, p2, p3, p4}, Landroid/webkit/WebViewClient;->onReceivedError(Landroid/webkit/WebView;ILjava/lang/String;Ljava/lang/String;)V

    .line 155
    iget-object v0, p0, Lcom/netease/newsreader/weibo/WeiboLogin$2;->this$0:Lcom/netease/newsreader/weibo/WeiboLogin;

    invoke-static {v0}, Lcom/netease/newsreader/weibo/WeiboLogin;->access$4(Lcom/netease/newsreader/weibo/WeiboLogin;)Landroid/widget/LinearLayout;

    move-result-object v0

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 156
    return-void
.end method

.method public onReceivedSslError(Landroid/webkit/WebView;Landroid/webkit/SslErrorHandler;Landroid/net/http/SslError;)V
    .locals 1
    .parameter "view"
    .parameter "handler"
    .parameter "error"

    .prologue
    .line 143
    if-eqz p2, :cond_0

    .line 144
    :try_start_0
    invoke-virtual {p2}, Landroid/webkit/SslErrorHandler;->proceed()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 149
    :cond_0
    :goto_0
    return-void

    .line 145
    :catch_0
    move-exception v0

    .line 147
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)Z
    .locals 3
    .parameter "view"
    .parameter "url"

    .prologue
    const/4 v2, 0x1

    .line 163
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin$2;->this$0:Lcom/netease/newsreader/weibo/WeiboLogin;

    invoke-static {v1}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 164
    const-string v1, "weibo4andriod://AccountSettingActivity"

    invoke-virtual {p2, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "weibo4andriod://AccountSettingActivity"

    invoke-virtual {p2, v1}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 165
    const-string v1, "weibo4andriod://AccountSettingActivity"

    invoke-virtual {p2, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    .line 166
    .local v0, index:I
    const/4 v1, -0x1

    if-eq v0, v1, :cond_0

    .line 167
    invoke-virtual {p2, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object p2

    .line 172
    .end local v0           #index:I
    :cond_0
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin$2;->this$0:Lcom/netease/newsreader/weibo/WeiboLogin;

    invoke-static {v1, p1, p2}, Lcom/netease/newsreader/weibo/WeiboLogin;->access$5(Lcom/netease/newsreader/weibo/WeiboLogin;Landroid/webkit/WebView;Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 173
    iget-object v1, p0, Lcom/netease/newsreader/weibo/WeiboLogin$2;->this$0:Lcom/netease/newsreader/weibo/WeiboLogin;

    invoke-virtual {v1}, Lcom/netease/newsreader/weibo/WeiboLogin;->finish()V

    .line 178
    :goto_0
    return v2

    .line 176
    :cond_1
    invoke-virtual {p1, p2}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    goto :goto_0
.end method
